package com.wskj.controller;


import com.wskj.base.Result;
import com.wskj.entity.Goods;
import com.wskj.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * <p>
 * 商品信息表 前端控制器
 * </p>
 *
 * @author 顽石教育-www.wskj.com
 * @since 2021-09-07
 */
@RestController
@RequestMapping("//goods")
public class GoodsController {

    @Autowired
private IGoodsService goodsService;
@GetMapping("/{id}")
public Result findById(@PathVariable Integer id){
  Goods goods = goodsService.findById(id);
return Result.ok(goods);
}

}
